package cn.wygandwdn.core.transport.client.handler;

import cn.wygandwdn.common.message.PongMessage;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @description:
 * @author: WYG
 * @time: 2021/10/28 10:51
 */
@ChannelHandler.Sharable
public class RpcClientPongHandler extends SimpleChannelInboundHandler<PongMessage> {

    private static final Logger log = LoggerFactory.getLogger(RpcClientResponseHandler.class);

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, PongMessage msg) throws Exception {
        log.debug("收到服务端心跳响应: {}", msg.getPong());
    }

}
